package com.example.shouybl.widget;

import android.content.Context;
import android.support.v7.widget.LinearLayoutCompat;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.shouybl.R;

/**
 * Created by liuZhi
 * 2015/10/18
 * 2015 current year.
 */
public class TitleBar extends LinearLayoutCompat {

    private android.widget.ImageView ivleft;
    private android.widget.TextView tvtitle;
    private android.widget.Button butright;

    public TitleBar(Context context) {
        super(context);
      //  initView();
    }

    public TitleBar(Context context, AttributeSet attrs) {
        super(context, attrs);
      //  initView();
    }

    public TitleBar(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
      //  initView();
    }

    private void initView() {
        LayoutInflater inflater= (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View view =inflater.inflate(R.layout.itam_title_layout,null);
        this.addView(view);
        this.butright = (Button) view.findViewById(R.id.btn_right);
        this.tvtitle = (TextView) view.findViewById(R.id.tv_title);
        this.ivleft = (ImageView) view.findViewById(R.id.iv_left);
    }
}
